package com.ag.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TbSched entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_SCHED", schema = "dbo", catalog = "AGDB")
public class TbSched implements java.io.Serializable {

	// Fields

	private TbSchedId id;
	private TbDuty tbDuty;
	private TbDetailShift tbDetailShift;
	private TbUser tbUser;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbSched() {
	}

	/** minimal constructor */
	public TbSched(TbSchedId id, TbDuty tbDuty, TbDetailShift tbDetailShift,
			TbUser tbUser) {
		this.id = id;
		this.tbDuty = tbDuty;
		this.tbDetailShift = tbDetailShift;
		this.tbUser = tbUser;
	}

	/** full constructor */
	public TbSched(TbSchedId id, TbDuty tbDuty, TbDetailShift tbDetailShift,
			TbUser tbUser, String a, String b, String c) {
		this.id = id;
		this.tbDuty = tbDuty;
		this.tbDetailShift = tbDetailShift;
		this.tbUser = tbUser;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "scTime", column = @Column(name = "SC_TIME", nullable = false, length = 23)),
			@AttributeOverride(name = "dsName", column = @Column(name = "DS_NAME", nullable = false, length = 10)),
			@AttributeOverride(name = "duId", column = @Column(name = "DU_ID", nullable = false, length = 20)),
			@AttributeOverride(name = "UId", column = @Column(name = "U_ID", nullable = false, length = 50)) })
	public TbSchedId getId() {
		return this.id;
	}

	public void setId(TbSchedId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DU_ID", nullable = false, insertable = false, updatable = false)
	public TbDuty getTbDuty() {
		return this.tbDuty;
	}

	public void setTbDuty(TbDuty tbDuty) {
		this.tbDuty = tbDuty;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DS_NAME", nullable = false, insertable = false, updatable = false)
	public TbDetailShift getTbDetailShift() {
		return this.tbDetailShift;
	}

	public void setTbDetailShift(TbDetailShift tbDetailShift) {
		this.tbDetailShift = tbDetailShift;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "U_ID", nullable = false, insertable = false, updatable = false)
	public TbUser getTbUser() {
		return this.tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

}